Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 12, 2025

This PR fixes the issue where long model names overflow the model selector dropdown.

Problem

Really long model names (like meta-llama/Llama-4-Maverick-17B-128E-Instruct) were overflowing the model selector, making the UI look broken.

Solution

Added the truncate CSS class to both:

  1. The selected model display in the button
  2. The model names in the dropdown list

This ensures that long model names are truncated with ellipsis (...) when they exceed the available width.

Testing

  • Ran existing tests for ModelPicker component - all passing
  • Linting and type checking passed

Screenshots

The truncation will now prevent overflow and show ellipsis for long model names, maintaining a clean UI appearance.


Important

Fixes overflow of long model names in ModelPicker.tsx by adding truncate CSS class to display elements.

  • UI Fix:
    • Add truncate CSS class to selectedModelId display in Button and model display in CommandItem in ModelPicker.tsx to prevent overflow.
  • Testing:
    • Existing tests for ModelPicker component passed.
    • Linting and type checking passed.

This description was created by Ellipsis for 6e27b6a. You can customize this summary. It will automatically update as commits are pushed.

@roomote roomote bot requested review from cte, jr and mrubens as code owners August 12, 2025 12:42
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. UI/UX UI/UX related or focused labels Aug 12, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing my own code because apparently I trust no one, not even myself.

className="w-full justify-between"
data-testid="model-picker-button">
<div>{selectedModelId ?? t("settings:common.select")}</div>
<div className="truncate">{selectedModelId ?? t("settings:common.select")}</div>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice we're using a <div> here but a <span> on line 197 for the same truncation purpose. Is this intentional? For consistency and semantic correctness (since this is inline text content), would it make sense to use <span> for both?

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 12, 2025
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
@mrubens mrubens merged commit 1d8b51d into main Aug 12, 2025
7 of 8 checks passed
@mrubens mrubens deleted the fix/truncate-long-model-names branch August 12, 2025 14:08
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Aug 12, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XS This PR changes 0-9 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants